<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="cache-control" content="no-cache">
<title>Genivia - mecevp.c File Reference</title>
<link href="genivia_tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="genivia_content.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="top">
 <div id="titlearea">
  <table height="72px" width="100%" cellspacing="0" cellpadding="0">
   <tbody>
    <tr>
     <td width="10%">&nbsp;</td>
     <td width="175px"><a href="https://www.genivia.com"><img alt="Genivia" src="GeniviaLogo2_trans_noslogan.png"/></a></td>
     <td class="tab_home"><a href="https://www.genivia.com">Home</a></td>
     <td class="tab_home"><a href="https://www.genivia.com/docs.html">Documentation</a></td>
     <td>
      <div style="float: right; font-size: 18px; font-weight: bold;">mecevp.c File Reference</div>
      <br>
      <div style="float: right; font-size: 10px;">updated Mon Sep 6 2021 by Robert van Engelen</div>
     </td>
     <td width="10%">&nbsp;</td>
    </tr>
   </tbody>
  </table>
 </div>
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b4c3aec6cd8f28418150dce663061cfa.html">plugin</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">mecevp.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="mecevp_8h.html">mecevp.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for mecevp.c:</div>
<div class="dyncontent">
<div class="center"><img src="mecevp_8c__incl.png" border="0" usemap="#mecevp_8c" alt=""/></div>
<map name="mecevp_8c" id="mecevp_8c">
<area shape="rect" id="node2" href="mecevp_8h.html" title="mecevp.h" alt="" coords="191,80,271,107"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ab224914c7f51237ba9161cfa2eef5aa7"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#ab224914c7f51237ba9161cfa2eef5aa7">soap_mec_upd</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data, const char **s, size_t *n, int final)</td></tr>
<tr class="memdesc:ab224914c7f51237ba9161cfa2eef5aa7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update encryption/decryption state depending on the current algorithm.  <a href="#ab224914c7f51237ba9161cfa2eef5aa7">More...</a><br /></td></tr>
<tr class="separator:ab224914c7f51237ba9161cfa2eef5aa7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50dfb78f17b5fc9d4d88143dad1acfae"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#a50dfb78f17b5fc9d4d88143dad1acfae">soap_mec_upd_enc</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data, const char **s, size_t *n, int final)</td></tr>
<tr class="memdesc:a50dfb78f17b5fc9d4d88143dad1acfae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update encryption state with input plain text (or raw) data and output in base64 format.  <a href="#a50dfb78f17b5fc9d4d88143dad1acfae">More...</a><br /></td></tr>
<tr class="separator:a50dfb78f17b5fc9d4d88143dad1acfae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e6378ac56026f285939a19b719be44c"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#a8e6378ac56026f285939a19b719be44c">soap_mec_upd_dec</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data, const char **s, size_t *n, int final)</td></tr>
<tr class="memdesc:a8e6378ac56026f285939a19b719be44c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update decryption state with input cipher data in base64 format and output in plain text (or raw) format.  <a href="#a8e6378ac56026f285939a19b719be44c">More...</a><br /></td></tr>
<tr class="separator:a8e6378ac56026f285939a19b719be44c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada7ca7ec7f4f9326c6e4ae156a713c98"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#ada7ca7ec7f4f9326c6e4ae156a713c98">soap_mec_check</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data, int err, const char *msg)</td></tr>
<tr class="memdesc:ada7ca7ec7f4f9326c6e4ae156a713c98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check result of init/update/final mecevp engine operations.  <a href="#ada7ca7ec7f4f9326c6e4ae156a713c98">More...</a><br /></td></tr>
<tr class="separator:ada7ca7ec7f4f9326c6e4ae156a713c98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a536c86103185136cd15c90705d26b9cd"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#a536c86103185136cd15c90705d26b9cd">soap_mec_put_base64</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data, const unsigned char *s, int n)</td></tr>
<tr class="memdesc:a536c86103185136cd15c90705d26b9cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write base64 formatted data stored in s of length n to internal buffer.  <a href="#a536c86103185136cd15c90705d26b9cd">More...</a><br /></td></tr>
<tr class="separator:a536c86103185136cd15c90705d26b9cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade12112e02cd71f155a9a3d68fc6fd7b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#ade12112e02cd71f155a9a3d68fc6fd7b">soap_mec_end_base64</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data)</td></tr>
<tr class="memdesc:ade12112e02cd71f155a9a3d68fc6fd7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">End writing base64 formatted data to internal buffer.  <a href="#ade12112e02cd71f155a9a3d68fc6fd7b">More...</a><br /></td></tr>
<tr class="separator:ade12112e02cd71f155a9a3d68fc6fd7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47f3849e214fbe05211df93ca5b5d750"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#a47f3849e214fbe05211df93ca5b5d750">soap_mec_get_base64</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data, char *t, size_t *l, const char *s, size_t n, const char **r, size_t *k)</td></tr>
<tr class="memdesc:a47f3849e214fbe05211df93ca5b5d750"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert base64-formatted data from s[0..n-1] into raw data in t[0..l-1] where l is the max size and set equal or lower if data fits in t. If data does not fit r points to remainder in s[0..n-1] of size k.  <a href="#a47f3849e214fbe05211df93ca5b5d750">More...</a><br /></td></tr>
<tr class="separator:a47f3849e214fbe05211df93ca5b5d750"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaabcdc5a9eafe14f35ddb41dc873ab54"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#aaabcdc5a9eafe14f35ddb41dc873ab54">soap_mec_filtersend</a> (struct soap *soap, const char **s, size_t *n)</td></tr>
<tr class="memdesc:aaabcdc5a9eafe14f35ddb41dc873ab54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback to modify outbound messages by encrypting through the engine.  <a href="#aaabcdc5a9eafe14f35ddb41dc873ab54">More...</a><br /></td></tr>
<tr class="separator:aaabcdc5a9eafe14f35ddb41dc873ab54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacb9fb2bc2d33968fe8cfe3e358ec16c"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#aacb9fb2bc2d33968fe8cfe3e358ec16c">soap_mec_filterrecv</a> (struct soap *soap, char *buf, size_t *len, size_t maxlen)</td></tr>
<tr class="memdesc:aacb9fb2bc2d33968fe8cfe3e358ec16c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback to modify inbound messages by decrypting through the engine.  <a href="#aacb9fb2bc2d33968fe8cfe3e358ec16c">More...</a><br /></td></tr>
<tr class="separator:aacb9fb2bc2d33968fe8cfe3e358ec16c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6144725452c8086c7b1807f6310ff79d"><td class="memItemLeft" align="right" valign="top">SOAP_FMAC1 int SOAP_FMAC2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#a6144725452c8086c7b1807f6310ff79d">soap_mec_init</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data, int alg, <a class="el" href="mecevp_8h.html#a064a5feaff6bbd0c904c0aa042135c4c">SOAP_MEC_KEY_TYPE</a> *pkey, unsigned char *key, int *keylen)</td></tr>
<tr class="memdesc:a6144725452c8086c7b1807f6310ff79d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize mecevp engine state and create context for encryption/decryption algorithm using a private/public key or symmetric secret key.  <a href="#a6144725452c8086c7b1807f6310ff79d">More...</a><br /></td></tr>
<tr class="separator:a6144725452c8086c7b1807f6310ff79d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c447a82872a919bb1935f34b849c1c4"><td class="memItemLeft" align="right" valign="top">SOAP_FMAC1 int SOAP_FMAC2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#a8c447a82872a919bb1935f34b849c1c4">soap_mec_update</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data, const char **s, size_t *n)</td></tr>
<tr class="memdesc:a8c447a82872a919bb1935f34b849c1c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update mecevp engine state: encrypts plain text (or raw data) or decrypts cipher data in base64 format.  <a href="#a8c447a82872a919bb1935f34b849c1c4">More...</a><br /></td></tr>
<tr class="separator:a8c447a82872a919bb1935f34b849c1c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa93413bd3e4136fe87a067821cfed53"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#aaa93413bd3e4136fe87a067821cfed53">soap_mec_final</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data, const char **s, size_t *n)</td></tr>
<tr class="memdesc:aaa93413bd3e4136fe87a067821cfed53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ends mecevp engine state: encrypt/decrypt remainder from buffers.  <a href="#aaa93413bd3e4136fe87a067821cfed53">More...</a><br /></td></tr>
<tr class="separator:aaa93413bd3e4136fe87a067821cfed53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81ba68931cefa8b7a0f246d99e31e3ed"><td class="memItemLeft" align="right" valign="top">SOAP_FMAC1 void SOAP_FMAC2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#a81ba68931cefa8b7a0f246d99e31e3ed">soap_mec_cleanup</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data)</td></tr>
<tr class="memdesc:a81ba68931cefa8b7a0f246d99e31e3ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up mecevp engine and deallocate cipher context and buffers.  <a href="#a81ba68931cefa8b7a0f246d99e31e3ed">More...</a><br /></td></tr>
<tr class="separator:a81ba68931cefa8b7a0f246d99e31e3ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c388668cf9472d0bf8abcb3e758786f"><td class="memItemLeft" align="right" valign="top">SOAP_FMAC1 int SOAP_FMAC2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#a4c388668cf9472d0bf8abcb3e758786f">soap_mec_begin</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data, int alg, <a class="el" href="mecevp_8h.html#a064a5feaff6bbd0c904c0aa042135c4c">SOAP_MEC_KEY_TYPE</a> *pkey, unsigned char *key, int *keylen)</td></tr>
<tr class="memdesc:a4c388668cf9472d0bf8abcb3e758786f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the mecevp engine data and begin encryption or decryption message sequence using a private/public key or symmetric secret key.  <a href="#a4c388668cf9472d0bf8abcb3e758786f">More...</a><br /></td></tr>
<tr class="separator:a4c388668cf9472d0bf8abcb3e758786f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc7e7012a43201730a0f67eb017897d3"><td class="memItemLeft" align="right" valign="top">SOAP_FMAC1 int SOAP_FMAC2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#afc7e7012a43201730a0f67eb017897d3">soap_mec_start_alg</a> (struct soap *soap, int alg, const unsigned char *key)</td></tr>
<tr class="memdesc:afc7e7012a43201730a0f67eb017897d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start encryption or decryption of current message. If key is non-NULL, use the symmetric key with alg. Use soap_mec_start only after soap_mec_begin. The soap_mec_start should be followed by a soap_mec_stop call.  <a href="#afc7e7012a43201730a0f67eb017897d3">More...</a><br /></td></tr>
<tr class="separator:afc7e7012a43201730a0f67eb017897d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af225c0e603c01f9a59c60d6465d90535"><td class="memItemLeft" align="right" valign="top">SOAP_FMAC1 int SOAP_FMAC2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#af225c0e603c01f9a59c60d6465d90535">soap_mec_start</a> (struct soap *soap, const unsigned char *key)</td></tr>
<tr class="memdesc:af225c0e603c01f9a59c60d6465d90535"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start encryption or decryption of current message. If key is non-NULL, use the symmetric key with alg. Use soap_mec_start only after soap_mec_begin. The soap_mec_start should be followed by a soap_mec_stop call.  <a href="#af225c0e603c01f9a59c60d6465d90535">More...</a><br /></td></tr>
<tr class="separator:af225c0e603c01f9a59c60d6465d90535"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedaa8cd525cac9cbe0904378419573d9"><td class="memItemLeft" align="right" valign="top">SOAP_FMAC1 int SOAP_FMAC2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#aedaa8cd525cac9cbe0904378419573d9">soap_mec_stop</a> (struct soap *soap)</td></tr>
<tr class="memdesc:aedaa8cd525cac9cbe0904378419573d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops encryption or decryption of current message. Use after soap_mec_start.  <a href="#aedaa8cd525cac9cbe0904378419573d9">More...</a><br /></td></tr>
<tr class="separator:aedaa8cd525cac9cbe0904378419573d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52b1ae6b5677aff39ac6f9548e9789b7"><td class="memItemLeft" align="right" valign="top">SOAP_FMAC1 int SOAP_FMAC2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#a52b1ae6b5677aff39ac6f9548e9789b7">soap_mec_end</a> (struct soap *soap, struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *data)</td></tr>
<tr class="memdesc:a52b1ae6b5677aff39ac6f9548e9789b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ends encryption or decryption of a sequence of message parts that began with soap_mec_begin.  <a href="#a52b1ae6b5677aff39ac6f9548e9789b7">More...</a><br /></td></tr>
<tr class="separator:a52b1ae6b5677aff39ac6f9548e9789b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a975a0081d5add97348fee0fa3b799f92"><td class="memItemLeft" align="right" valign="top">SOAP_FMAC1 size_t SOAP_FMAC2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mecevp_8c.html#a975a0081d5add97348fee0fa3b799f92">soap_mec_size</a> (int alg, <a class="el" href="mecevp_8h.html#a064a5feaff6bbd0c904c0aa042135c4c">SOAP_MEC_KEY_TYPE</a> *pkey)</td></tr>
<tr class="memdesc:a975a0081d5add97348fee0fa3b799f92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of octets needed to store the public/private key or the symmetric key, depending on the algorithm.  <a href="#a975a0081d5add97348fee0fa3b799f92">More...</a><br /></td></tr>
<tr class="separator:a975a0081d5add97348fee0fa3b799f92"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a4c388668cf9472d0bf8abcb3e758786f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOAP_FMAC1 int SOAP_FMAC2 soap_mec_begin </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>alg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="mecevp_8h.html#a064a5feaff6bbd0c904c0aa042135c4c">SOAP_MEC_KEY_TYPE</a> *&#160;</td>
          <td class="paramname"><em>pkey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>keylen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the mecevp engine data and begin encryption or decryption message sequence using a private/public key or symmetric secret key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">alg</td><td>encryption/decryption algorithm </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pkey</td><td>public/private key or NULL </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">key</td><td>secret key or encrypted ephemeral secret key set with envelope encryption, or NULL </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">keylen</td><td>secret key length </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or error code </dd></dl>

</div>
</div>
<a class="anchor" id="ada7ca7ec7f4f9326c6e4ae156a713c98"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int soap_mec_check </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ok</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>msg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check result of init/update/final mecevp engine operations. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ok</td><td>EVP error value </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>error message </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
<a class="anchor" id="a81ba68931cefa8b7a0f246d99e31e3ed"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOAP_FMAC1 void SOAP_FMAC2 soap_mec_cleanup </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clean up mecevp engine and deallocate cipher context and buffers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
<a class="anchor" id="a52b1ae6b5677aff39ac6f9548e9789b7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOAP_FMAC1 int SOAP_FMAC2 soap_mec_end </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Ends encryption or decryption of a sequence of message parts that began with soap_mec_begin. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or error code </dd></dl>

</div>
</div>
<a class="anchor" id="ade12112e02cd71f155a9a3d68fc6fd7b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void soap_mec_end_base64 </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>End writing base64 formatted data to internal buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aacb9fb2bc2d33968fe8cfe3e358ec16c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int soap_mec_filterrecv </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>maxlen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Callback to modify inbound messages by decrypting through the engine. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">buf</td><td>encrypted message, afterwards contains decrypted content </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">len</td><td>encrypted message size, afterwards set to decrypted content size </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">maxlen</td><td>max length of allocated buf size to contain decrypted content </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
<a class="anchor" id="aaabcdc5a9eafe14f35ddb41dc873ab54"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int soap_mec_filtersend </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Callback to modify outbound messages by encrypting through the engine. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">s</td><td>plain text message, afterwards set to encrypted message </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">n</td><td>plain text message size, afterwards set to encrypted message size </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
<a class="anchor" id="aaa93413bd3e4136fe87a067821cfed53"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int soap_mec_final </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Ends mecevp engine state: encrypt/decrypt remainder from buffers. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">s</td><td>afterwards points to converted remaining data in streaming mode, or entire converted data in buffer mode (SOAP_MEC_STORE option) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">n</td><td>afterwards size of remaining data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
<a class="anchor" id="a47f3849e214fbe05211df93ca5b5d750"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int soap_mec_get_base64 </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>t</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>l</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>k</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Convert base64-formatted data from s[0..n-1] into raw data in t[0..l-1] where l is the max size and set equal or lower if data fits in t. If data does not fit r points to remainder in s[0..n-1] of size k. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">t</td><td>raw data (converted from base64) </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">l</td><td>max size of t[], afterwards actual size of data written to t[] </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>data in base64 format </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>size of base64 data </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>if data does not fit in t[], points to s[] remainder to convert </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">k</td><td>if data does not fit in t[], size of remainder in r[] </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
<a class="anchor" id="a6144725452c8086c7b1807f6310ff79d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOAP_FMAC1 int SOAP_FMAC2 soap_mec_init </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>alg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="mecevp_8h.html#a064a5feaff6bbd0c904c0aa042135c4c">SOAP_MEC_KEY_TYPE</a> *&#160;</td>
          <td class="paramname"><em>pkey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>keylen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize mecevp engine state and create context for encryption/decryption algorithm using a private/public key or symmetric secret key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">alg</td><td>encryption/decryption algorithm </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pkey</td><td>public/private key or NULL </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">key</td><td>secret key or encrypted ephemeral secret key set with envelope encryption, or NULL </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">keylen</td><td>secret key length </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
<a class="anchor" id="a536c86103185136cd15c90705d26b9cd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void soap_mec_put_base64 </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Write base64 formatted data stored in s of length n to internal buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>data to convert </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>length of data to convert </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a975a0081d5add97348fee0fa3b799f92"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOAP_FMAC1 size_t SOAP_FMAC2 soap_mec_size </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>alg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="mecevp_8h.html#a064a5feaff6bbd0c904c0aa042135c4c">SOAP_MEC_KEY_TYPE</a> *&#160;</td>
          <td class="paramname"><em>pkey</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of octets needed to store the public/private key or the symmetric key, depending on the algorithm. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">alg</td><td>is the algorithm to be used </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pkey</td><td>is a pointer to an EVP_PKEY object or NULL for symmetric keys </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>size_t number of octets that is needed to hold the key. </dd></dl>

</div>
</div>
<a class="anchor" id="af225c0e603c01f9a59c60d6465d90535"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOAP_FMAC1 int SOAP_FMAC2 soap_mec_start </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start encryption or decryption of current message. If key is non-NULL, use the symmetric key with alg. Use soap_mec_start only after soap_mec_begin. The soap_mec_start should be followed by a soap_mec_stop call. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>secret DES/AES key or NULL </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or error code </dd></dl>

</div>
</div>
<a class="anchor" id="afc7e7012a43201730a0f67eb017897d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOAP_FMAC1 int SOAP_FMAC2 soap_mec_start_alg </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>alg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start encryption or decryption of current message. If key is non-NULL, use the symmetric key with alg. Use soap_mec_start only after soap_mec_begin. The soap_mec_start should be followed by a soap_mec_stop call. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">alg</td><td>algorithm </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>secret DES/AES key or NULL for private key </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or error code </dd></dl>

</div>
</div>
<a class="anchor" id="aedaa8cd525cac9cbe0904378419573d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOAP_FMAC1 int SOAP_FMAC2 soap_mec_stop </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stops encryption or decryption of current message. Use after soap_mec_start. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">soap</td><td>context </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or error code </dd></dl>

</div>
</div>
<a class="anchor" id="ab224914c7f51237ba9161cfa2eef5aa7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int soap_mec_upd </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>final</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update encryption/decryption state depending on the current algorithm. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">s</td><td>input data to convert, afterwards points to converted data (original content is unchanged) </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">n</td><td>size of input, afterwards size of output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">final</td><td>flag to indicate no more input, output is flushed to s </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
<a class="anchor" id="a8e6378ac56026f285939a19b719be44c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int soap_mec_upd_dec </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>final</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update decryption state with input cipher data in base64 format and output in plain text (or raw) format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">s</td><td>input cipher data, afterwards points to output plain text </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">n</td><td>size of input cipher data, afterwards size of plain text </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">final</td><td>flag to indicate no more input, output is flushed to s </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
<a class="anchor" id="a50dfb78f17b5fc9d4d88143dad1acfae"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int soap_mec_upd_enc </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>final</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update encryption state with input plain text (or raw) data and output in base64 format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">s</td><td>input plain text, afterwards points to output cipher data </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">n</td><td>size of input text, afterwards size of cipher data </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">final</td><td>flag to indicate no more input, output is flushed to s </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
<a class="anchor" id="a8c447a82872a919bb1935f34b849c1c4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SOAP_FMAC1 int SOAP_FMAC2 soap_mec_update </td>
          <td>(</td>
          <td class="paramtype">struct soap *&#160;</td>
          <td class="paramname"><em>soap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsoap__mec__data.html">soap_mec_data</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Update mecevp engine state: encrypts plain text (or raw data) or decrypts cipher data in base64 format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">soap</td><td>context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">data</td><td>mecevp engine context </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">s</td><td>input data to convert, afterwards points to converted data (original content is unchanged) </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">n</td><td>size of input, afterwards size of output </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>SOAP_OK or SOAP_SSL_ERROR </dd></dl>

</div>
</div>
</div><!-- contents -->
<hr class="footer">
<address class="footer">
Copyright (C) 2021, Robert van Engelen, Genivia Inc., All Rights Reserved.
</address>
<address class="footer"><small>
Converted on Mon Sep 6 2021 11:22:56 by <a target="_blank" href="http://www.doxygen.org/index.html">Doxygen</a> 1.8.11</small></address>
<br>
<div style="height: 246px; background: #DBDBDB;">
</body>
</html>
